﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
using Public;

namespace WebsiteAdmin.Salomon.ProInfo
{
    public partial class CatCreate : System.Web.UI.Page
    {
        public int pkid;
        public string parName = "--";
        public int parID = 0;
        public int catRank = 1;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                pkid = Convert.ToInt32(Request["pid"], CultureInfo.InvariantCulture);
                DataTable dtCategory = Bll.Category.Single(Global.ConSalomon, pkid);
                if (dtCategory.Rows.Count == 1)
                {
                    parID = Convert.ToInt32(dtCategory.Rows[0]["ParID"]);
                    parName = dtCategory.Rows[0]["CatName"].ToString();
                    catRank = Convert.ToInt16(dtCategory.Rows[0]["CatRank"]) + 1;
                }
                

                dtCategory.Dispose();
            }
        }
    }
}
